<?php
class User_Service_Menu
{
	public function __construct(){
		
	}

	public function add($row){
		$Obj = new User_Model_Menu();
		return $Obj->add($row);		
	}
	
	public function update($row,$id){
		$Obj = new User_Model_Menu();
		return $Obj->update($row,$id);		
	}
	
	public function delete($id){
		$Obj = new User_Model_Menu();
		return $Obj->delete($id);		
	}
	
	/**
	 * 获取指定模块信息
	 */
	public function getByUmid($id){
		$Obj = new User_Model_Menu();
		return $Obj->getByUmid($id);		
	}
	
	/**
	 * 根据条件获取指定信息
	 */
	public function getByCond($cond,$type,$order,$count,$offset){
		$Obj = new User_Model_Menu();
		$rows = $Obj->getByCond($cond,$type,$order,$count,$offset);
		return $rows;		
	}
	
	public function getAll(){
		$Obj = new User_Model_Menu();
		return  $Obj->getAll();
	}
	
	/**
	 * 获取指定列表的总数
	 */
	public static function getCount(){
		$cond = array('import_status'=>array(0,2),'orderType'=>-1);
		$orderModel = new Order_Model_Order();
		$count = $orderModel->getByCategoryAndOrderTypeNew($cond,'count(*)');
		return$count;
	}
	
	
}